{% extends 'base.html'%}
{% load i18n %}
{% block menutab %}
<div class="menutab"><a href="/">{% trans 'All topic' %}</a></div>
<div class="menutab"><a href="/mainpage/">{% trans 'My home page' %}</a></div>
<div class="menutab currenttab"><a href="/search/">{% trans 'Search microblogs' %}</a></div>
{% endblock %}
{% block main %}

<form id="side-search-form" method="post" action="/search/" >
<div id="side-search-box">
<input type="text" id="side-search-input" name="searchstr" autocomplete="off" tip="Search Microblogs" class="input-tip">
<button id="side-go-search" type="submit">Search</button>
</div>
<input type="radio" name="search_type" checked="checked" value="index" /> {% trans 'All microblogs' %}
<input type="radio" name="search_type" value="mainpage" /> {% trans 'Followed microblogs' %}
<input type="radio" name="search_type" value="self" /> {% trans 'My microblogs' %}
<input type="radio" name="search_type" value="member" /> {% trans 'All users' %}
<input type="radio" name="search_type" value="follow" /> {% trans 'Follow users' %}
</form>

<div id="TopicWrap">
{% if search_type == 'user' %}
    {% include 'people.html'%}
{% else %}
    {% include 'topics.html'%}
{% endif %}
</div>
{% if paginator.count > paginator.per_page %}
<div class="pagination">
	<span class="step-links">
		{% if topics.has_previous %}
			<span class="prev round-corner-button"><a href="?page={{ topics.previous_page_number }}">{% trans 'PREV' %}</a></span>
		{% endif %}

		<span class="current round-corner-button">
			{% trans 'PAGE' %} {{ topics.number }}/{{ topics.paginator.num_pages }}
		</span>

		{% if topics.has_next %}
			<span class="next round-corner-button"><a href="?page={{ topics.next_page_number }}">{% trans 'NEXT' %}</a></span>
		{% endif %}
	</span>
</div>
{% endif %}
{% endblock %}
